﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Wika
{
    public partial class ViewSet : Form
    {
        Cot Columns;
        Bang Table;
        public ViewSet(Bang Table_,Cot Columns_)
        {
            InitializeComponent();
            Columns = Columns_;
            Table = Table_;
        }
        public ViewSet()
        {
            InitializeComponent();
        }

        private void ViewSet_Load(object sender, EventArgs e)
        {
            try
            {
                //listView1.Columns.Add("STT");
                for (int i = 0; i < Columns.thuoctinh.Length; i++)
                    listView1.Columns.Add(Columns.thuoctinh[i]);
                for (int i = 0; i < Table.mau.Count; i++)
                {
                    ListViewItem item=new ListViewItem(Table.mau[i].giatri);
                    listView1.Items.Add(item);
                   
                }
            }
            catch (Exception)
            { MessageBox.Show("Dataset not found !!"); this.Close(); }
        }
       
    }
}